/**
 * Created by wangkui on 2016/1/26.
 */
var express = require('express'),
    panoctl = require('./pano.controller'),
    panotagCtl = require('./panotag.controller'),
    auth = require('./../../auth/auth.service');

var router = express.Router();

//全景
router.get('/',panoctl.index);
router.get('/all', auth.isValidatedToken, panoctl.all);
router.get('/:id',panoctl.show);
router.post('/', auth.isValidatedToken, panoctl.create);
router.put('/:id', auth.isValidatedToken, panoctl.update);

//全景标注点
router.get('/:panoid/tags',panotagCtl.gettags);
router.get('/:panoid/tags/random',panotagCtl.getRandomTags);
router.post('/:panoid/tags',auth.isValidatedToken, panotagCtl.createTag);
router.put('/:panoid/tags/:id', auth.isValidatedToken,panotagCtl.updateTag);
router.delete('/:panoid/tags/:id',auth.isValidatedToken,panotagCtl.deleteTag);

module.exports = router;